<script>
var _siteUrl = '<?php echo  Yii::app()->params['siteUrl']?>';
$(function() {
	$( "#entry_point" ).datepicker({ dateFormat: 'yy-mm-dd' });
});
</script>
<?php
/* @var $this HecUserController */
/* @var $model HecUser */
Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . "/global/js/pages/user.js");
Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . "/global/js/plugins/jquery-ui-1.8.16.custom.min.js");
Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . "/global/js/plugins/jquery-ui-timepicker-addon.js");
Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . "/global/js/plugins/jquery.validate.js");
Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . "/global/js/pages/adminUserLevel.js");
$this->breadcrumbs=array(
	'Hec Users'=>array('index'),
	$model->id=>array('view','id'=>$model->id),
	'Update',
);

?>

<span class="page_h3">更新 元素信息 <?php echo $model->c_username; ?></span>

<form action="#" method="post" id="form1">
    <span>基本信息</span>
    <table cellpadding="1" cellspacing="1" class="c_table">
        <tr class="r1" >
            <td class='c_row0' width="140" align="right">工号：</td>
            <td width="450"><input type="text" autocomplete="off" name="unique_id" id="unique_id" class="small_input bg_orange" value="<?php echo $model->unique_id?>" />
            <span class="red">*</span></td>
            <td class="red"></td>
        </tr>
        <tr class="r2">
            <td class='c_row1' align="right">名称(邮箱前缀)：</td>
            <td>
            <input type="text" onchange="username2email();"  autocomplete="off" name="username" id="username" class="small_input bg_orange" value="<?php echo $model->username?>" />
            <span class="red">*</span>
            </td>
            <td class="red"></td>
        </tr>
        <tr class="r1">
            <td class='c_row0' align="right">中文姓名：</td>
            <td>
            <input type="text"  autocomplete="off" name="c_username" id="c_username" class="small_input bg_orange" value="<?php echo $model->c_username?>" />
            <span class="red">*</span>
            </td>
            <td class="red"></td>
        </tr>
        <tr class="r2">
            <td class='c_row0' align="right">生日：</td>
            <td>
            <input type="text"  autocomplete="off" name="birthday" id="birthday" class="small_input bg_orange" value="<?php echo $model->birthday?>" />
            格式：X月X日
            </td>
            <td class="red"></td>
        </tr>
        <tr class="r1">
            <td class='c_row0' align="right">邮箱：</td>
            <td>
            <input type="text"  autocomplete="off" name="email" id="email" class="small_input bg_orange" value="<?php echo $model->username?>" />@happyelements.com
            <span class="red">*</span>
            </td>
            <td class="red"></td>
        </tr>
        <tr class="r2">
            <td class='c_row0' align="right">手机：</td>
            <td>
            <input type="text" name="mobile" id="mobile" class="small_input bg_orange" value="<?php echo $model->mobile?>" />
            
            </td>
            <td class="red"></td>
        </tr>
        <tr class="r1">
            <td class='c_row0' align="right">部门：</td>
            <td>
            <?php echo CHtml::dropDownList('department' ,$model->department ,$departmentOption,array('class'=>'mid_select2 bg_orange')); ?>
            <span class="red">*</span>
            </td>
            <td class="red"></td>
        </tr>
        <tr class="r2">
            <td class='c_row0' align="right">BU：</td>
            <td>
            <?php echo CHtml::dropDownList('bu' ,$model->bu ,$buOption,array('class'=>'mid_select2 bg_orange')); ?>
            <span class="red">*</span>
            </td>
            <td class="red"></td>
        </tr>
        <tr class="r1">
            <td class='c_row0' align="right">成本中心CODE：</td>
            <td>
            <?php echo CHtml::dropDownList('code' ,$model->code ,$codeOption,array('class'=>'mid_select2 bg_orange')); ?>
            <span class="red">*</span>
            </td>
            <td class="red"></td>
        </tr>
        <tr class="r2">
            <td class='c_row0' align="right">公司：</td>
            <td>
            <?php echo CHtml::dropDownList('company' ,$model->company ,$companyOption,array('class'=>'mid_select2 bg_orange')); ?>
            <span class="red">*</span>
            </td>
            <td class="red"></td>
        </tr>
        <tr class="r1">
            <td class='c_row0' align="right">职位类别：</td>
            <td>
            <?php echo CHtml::dropDownList('attribute' ,isset($model->attribute)?$model->attribute:0 ,$attrOption,array('class'=>'mid_select2')); ?>
            </td>
            <td class="red"></td>
        </tr>
        <tr class="r2">
            <td class='c_row0' align="right">属性：</td>
            <td>
            <input type="text" name="position" id="position" class="small_input bg_orange" value="<?php echo $model->position?>" />
            </td>
            <td class="red"></td>
        </tr>
        <tr class="r1">
            <td class='c_row0' align="right">工作性质：</td>
            <td>
            <?php echo CHtml::dropDownList('work_type' ,isset($model->work_type)?$model->work_type:0 ,$workTypeOption,array('class'=>'mid_select2')); ?>
            </td>
            <td class="red"></td>
        </tr>
        <tr class="r2">
            <td class='c_row0' align="right">入职时间：</td>
            <td>
            <input type="text" autocomplete="off" name="entry_point" id="entry_point" class="small_input bg_orange" value="<?php echo $model->entry_point?>" />
            <span class="red">*</span>
            </td>
            <td class="red"></td>
        </tr>
        <tr class="r1">
            <td class='c_row0' align="right">性别：</td>
            <td>
            <?php echo CHtml::dropDownList('gender' ,0 ,$genderOption,array('class'=>'mid_select2')); ?>
            </td>
            <td class="red"></td>
        </tr>
        <tr class="r2">
            <td class='c_row0' align="right">试用期：</td>
            <td>
            <input type="text" autocomplete="off" name="probation" id="probation" class="small_input bg_orange" value="<?php echo $model->probation?>" />个月
            </td>
            <td class="red"></td>
        </tr>
        <tr class="r1">
            <td class='c_row0' align="right">状态：</td>
            <td>
            <?php echo CHtml::dropDownList('status' ,1 ,$statusOption,array('class'=>'mid_select2')); ?>
            &nbsp;<span class="red">*</span>
            </td>
            <td class="red"></td>
        </tr>
        <tr class="r2">
            <td class='c_row0'></td>
            <td>
                <input type="hidden" name="id" id="id" value="<?php echo $model->id?>" />
                <input type="hidden" name="action" value="update" />
                <input type="hidden" value="<?php echo Yii::app()->request->csrfToken; ?>"  name="YII_CSRF_TOKEN" />
                <input type="submit" name="fsubmit" id="form_submit" class="button_grey" value=" 确 定 " />
                <input type="button" name="r" value=" 关 闭 " class="button_grey" onclick="javascript:if(confirm('确定关闭本页？'))window.close();" />
            </td>
            <td></td>
        </tr>
    </table>
    </form>
    <br />
